import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamDemo {

    public static void main(String[] args) {
        List<String> players = Arrays.asList("ji", "aaaas", "cc", "abbb");//列表,集合,set,hashset
        String[] playerse2 = {"ji", "aaaas", "cc", "abbb"};//数组
//        Stream.of(playerse2).filter().map();
//        for (String player : players) {//iter 增强for循环
//            if (player.startsWith("L")) {
//                String temp = player.toUpperCase();
//            }
//        }
        List<String> sorted = players.stream()
                .filter(s -> s.startsWith("a")).map(String::toUpperCase).sorted().collect(Collectors.toList());

        System.out.println(sorted);

    }

}
